package com.poisonh.unifiedauth.ui;

import android.os.Bundle;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;

import com.poisonh.unifiedauth.R;
import com.poisonh.unifiedauth.utils.ConstantUitls;

/**
 * Created by PoisonH on 2016/8/4.
 */
public class InfoDetailsActivity extends BaseActivity implements View.OnClickListener
{
    private String mStrInfoId;
    private WebView mWbView;

    @Override
    protected void loadContentView(Bundle savedInstanceState)
    {
        setContentView(R.layout.activity_infodetails);
        mStrInfoId = getIntent().getStringExtra("INFOID");
        initTitleView();
        initView();
    }

    @Override
    protected void initView()
    {
        setTitleTxt("消息详情");
        mLeftBtn.setOnClickListener(this);
        mRightBtn.setVisibility(View.GONE);
        mWbView = (WebView) findViewById(R.id.wv_webview);
        WebSettings settings = mWbView.getSettings();
        settings.setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NARROW_COLUMNS);
        settings.setUseWideViewPort(true);//设置此属性，可任意比例缩放
        settings.setLoadWithOverviewMode(true);
        settings.setJavaScriptEnabled(true);
        mWbView.loadUrl(ConstantUitls.REQUEDT_IMG_URL + ConstantUitls.GETMESSINFO + "?messId=" + mStrInfoId);
    }


    @Override
    public void onClick(View v)
    {
        switch (v.getId())
        {
            case R.id.ib_left_btn:
                finish();
                break;
        }
    }

}
